<template>
  <div class="barrage-main">
    <!-- 滚动弹幕 -->
    <barrage-screen ref="barrageScreenRef"></barrage-screen>
    <!-- 发送窗口 -->
    <barrage-send @addBarrage="addBarrage"></barrage-send>
  </div>
</template>

<script setup>
import { ref } from "vue";
import BarrageScreen from "@/components/Barrage/BarrageScreen";
import BarrageSend from "@/components/Barrage/BarrageSend";

const barrageScreenRef = ref(null);
/** 增加弹幕 */
function addBarrage(barrageData){
  barrageScreenRef.value.addBarrage(barrageData);
}
</script>

<style scoped>
@import "./vueBarrage.css";
</style>
